package com.aacar.dao.impl;

import org.springframework.stereotype.Repository;

import com.aacar.dao.CheckCodeDao;
import com.aacar.dao.base.CommonBaseDao;
import com.aacar.entity.CheckCode;
import com.aacar.utils.DateUtil;

@Repository("checkCodeDao")
public class CheckCodeDaoImpl extends CommonBaseDao<CheckCode, String> implements CheckCodeDao {

	private static final String nameSpace = "com.aacar.dao.CheckCodeDao.";

	@Override
	public CheckCode findCheckCode(CheckCode checkCode){
		return this.getSqlSession().selectOne(nameSpace + "findCheckCode", checkCode);
	}

	@Override
	public int save(CheckCode checkCode) {
		checkCode.setCreateTime(DateUtil.getNowDate());
		checkCode.setModifyTime(DateUtil.getNowDate());
		return saveObject(nameSpace.concat("save"), checkCode);
	}

	@Override
	public int update(CheckCode checkCode) {
		return updateObject(nameSpace.concat("update"), checkCode);
	}
	

	
}
